<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace App\Controller;

use App\FizeChan\Test;
use alidayu\Sms;

/**
 * Description of Index
 *
 * @author Administrator
 */
class Index
{

    /**
     * 测试1
     */
    public function index()
    {
        phpinfo();
    }

    /**
     * 测试2
     */
    public function actionTest()
    {
        echo 'For Test';
    }

    public function actionSms()
    {
        $result = Sms::account('14759786559', '123456');
    }

    /**
     * 测试3
     */
    public function actionLoad()
    {
        $test = new Test();
    }

    public function actionDate()
    {
        $date1 = date('Y-m-t');
        var_dump($date1);
    }

    public function actionSbr()
    {
        $str = substr_replace("SELECT * FROM abc", " TOP 1", 6, 0);
        echo $str;
    }

    public function actionsearch()
    {
        $arr = ['a', 'b', 'c'];
        $idx = array_search('c', $arr);
        var_dump($idx);

        $first_id = 'AutoGrabBanker';

        $points = ['AutoGameStart', 'AutoGrabBanker', 'AutoMultiples', 'AutoShowCard'];
        $index = array_search($first_id, $points);
        for ($i = $index; $i < count($points); $i++) {
            echo "{$points[$i]}<br/>";
        }
    }

    public function actionTrim()
    {
        $po['amount'] = "271634         ";
        $icbpo_amount = 0.12;
        $icbpo_amount += (float)trim($po['amount']);
        var_dump($icbpo_amount);
    }

    public function actionE()
    {
        $big_int = '1e18';
        var_dump($big_int);
    }
}
